﻿ 
Public Class EWebBrowser
    Inherits WebBrowser
    Dim Iwb2 As SHDocVw.IWebBrowser2


    Protected Overrides Sub AttachInterfaces(nativeActiveXObject As Object)
        Iwb2 = TryCast(nativeActiveXObject, SHDocVw.IWebBrowser2)
        Iwb2.Silent = True
        MyBase.AttachInterfaces(nativeActiveXObject)
    End Sub

    Protected Overrides Sub DetachInterfaces()
        Iwb2 = Nothing
        MyBase.DetachInterfaces()
    End Sub 

End Class